package cc.site.main.tools.aliyun;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @CREATE By yangruomao On 2024/4/13
 */

@Component
public class AliyunOssProperties implements InitializingBean {
    @Value("${oss.aliyun.endpoint}")
    private String endpoint;
    @Value("${oss.aliyun.keyid}")
    private String keyid;
    @Value("${oss.aliyun.keysecret}")
    private String keysecret;
    @Value("${oss.aliyun.bucketname}")
    private String bucketname;


    public static String END_POINT;
    public static String KEY_ID;
    public static String KEY_SECRET;
    public static String BUCKET_NAME;

    @Override
    public void afterPropertiesSet() {
        END_POINT = endpoint;
        KEY_ID = keyid;
        KEY_SECRET = keysecret;
        BUCKET_NAME = bucketname;
    }
}
